import request from './index.js'

//获取视频分类
export const getVideoClass = () => request({
	url: '/classify'
})

//获取视频列表
export const getVideoData = (id, num, size) => request({
	url: `/video?video=${id}&pageNum=${num}&pageSize=${size}`
})

//获取视频详情
export const getVideoDetailData = (video_id, user_id) => request({
	url: `/video?video=${video_id}&user_id=${user_id}`
})

//获取视频详情视频列表
export const getVideoDetailListData = (video_id) => request({
	url: `/child_video?video_id=${video_id}&pageNum=1&pageSize=10`
})

//视频点赞
export const changeVideoZan = (type, data) => request({
	url: `/videoRemark?remark=${type}`,
	method: 'POST',
	data: data
})

//视频收藏
export const changeVideoCollect = (type, data) => request({
	url: `/videoCollect?collect=${type}`,
	method: 'POST',
	data: data
})

// 视频添加评论
export const addVideoComment = (data) => request({
	url: `/videoComment`,
	method: 'POST',
	data: data
})

//查询视频评论
export const getVideoCommentList = (id, num, size) => request({
	url: `/videoCommentId?video_id=${id}&pageNum=${num}&pageSize=${size}`
})
